<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="姓名：" prop="driver_name">
          <el-input v-model="form.model.driver_name" clearable />
        </el-form-item>
        <el-form-item label="身份证号：" prop="driver_idcard">
          <el-input v-model="form.model.driver_idcard" clearable />
        </el-form-item>
        <el-form-item label="照片：" prop="photo_id">
          <el-input v-model="form.model.photo_id" clearable />
        </el-form-item>
        <el-form-item label="联系方式：" prop="driver_contact">
          <el-input v-model="form.model.driver_contact" clearable />
        </el-form-item>
        <el-form-item label="准驾车型：" prop="driver_class">
          <el-input v-model="form.model.driver_class" clearable />
        </el-form-item>
        <el-form-item label="驾驶证有效期：" prop="driving_license_expiry_date">
          <el-input v-model="form.model.driving_license_expiry_date" clearable />
        </el-form-item>
        <el-form-item label="从业资格证有效期：" prop="qualification_certificate_card_expiry_date">
          <el-input v-model="form.model.qualification_certificate_card_expiry_date" clearable />
        </el-form-item>
        <el-form-item label="状态：" prop="driver_status">
          <el-input v-model="form.model.driver_status" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'netmodular-ui'

const { add, edit, update } = $api.dispatch.driver_info

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '驾驶员',
      actions: { add, edit, update },
      form: {
        model: {
          /** 姓名 */
          driver_name: '',
          /** 身份证号 */
          driver_idcard: '',
          /** 照片 */
          photo_id: '',
          /** 联系方式 */
          driver_contact: '',
          /** 准驾车型 */
          driver_class: '',
          /** 驾驶证有效期 */
          driving_license_expiry_date: '',
          /** 从业资格证有效期 */
          qualification_certificate_card_expiry_date: '',
          /** 状态 */
          driver_status: ''
        },
        rules: {}
      }
    }
  }
}
</script>
